public class Demo2 {
    public static void main(String[] args) throws InterruptedException {
        Thread cur = Thread.currentThread();
        Thread t1 = new Thread(() -> {
            try {
                cur.join();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println("t1 线程启动");
        });

        t1.start();

        for (int i = 0; i < 3; i++) {
            System.out.println("Hello Main");
        }
    }
}
